# -*- coding:utf-8 -*-
__author__ = 'shuxin'
__date__ = '2020/6/13  15:45'

import json

from django.http import HttpResponse
from django.views import View


class OrderBackfilltView(View):
    def post(self, request):
        info = {
            "ResponseBody": {
                "OpenIssueBillSearchResultList": [
                    {
                        "IssueBillID": 618200389,
                        "IssueStatus": "1",
                        # 出票单状态枚举： 1:未出票 2:出票失败（自动出票失败） 3:已出票 4:已取消（已确认取消） 5:已作废（已拒单） 6:已入库（自动出票：已在航司网站下单） 7:已支付（自动出票：已在航司网站支付） 8:验证中
                        "PolicyCode": "FD@BJNZ@0/FD@BJNZ@693671"
                    }
                ]
            },
            "Header": {
                "ShouldRecordPerformanceTime": False,
                "RequestID": "50ec70ed-a634-402c-889b-ff38bc0743e1",
                "ResultCode": 0,
                "AssemblyVersion": "2.9.8.0",
                "RequestBodySize": 0,
                "SerializeMode": 0,
                "RouteStep": 1,
                "Environment": "PRO"
            }
        }

        error_info = {
            "status": "F103",
            "msg": "订单状态不正确",
            "orderLists": None
        }

        return HttpResponse(json.dumps(info, ensure_ascii=False), content_type="application/json")
